package com.aco.party.enums;

/**
 * Created by flying on 4/7/2016 0007.
 */
public enum RoleEnum {
    普通用户(1,"普通用户"),
    认证用户(2,"认证用户"),
    专栏作者(3,"专栏作者"),
    网站编辑(4,"网站编辑"),
    管理员(5,"管理员");

    private int value;
    private String desc;

    RoleEnum(int value, String desc){
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static RoleEnum getUserStatus(int value){
        for (RoleEnum type : RoleEnum.values()) {
            if(type.value == value)
                return type;
        }
        return 普通用户;
    }
}
